<template>
  <el-card style="margin-top:20px">
    <el-table
      ref="multipleTable"
      :data="tableData"
      tooltip-effect="dark"
      style="width: 100%"
      @selection-change="handleSelectionChange"
    >

      <el-table-column
        type="selection"
        width="55"
      />

      <el-table-column
        prop="name"
        label="序号"
        width="120"
      />
      <el-table-column
        prop="name"
        label="设备编号"
        width="120"
      />
      <el-table-column
        prop="name"
        label="设备型号"
        width="120"
      />
      <el-table-column
        prop="address"
        label="详细地址"
        width="220"
        show-overflow-tooltip
      />
      <el-table-column
        prop="name"
        label="合作商"
        width="140"
      />
      <el-table-column
        prop="name"
        label="设备状态"
        width="120"
      />
      <el-table-column label="操作">
        <template>
          <el-button type="text" size="small">货道</el-button>
          <el-button type="text" size="small">策略</el-button>
          <el-button type="text" size="small">修改</el-button>
        </template>
      </el-table-column>

    </el-table>

  </el-card>
</template>

<script>
export default {
  data() {
    return {
      tableData: [{
        date: '2016-05-03',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 弄'
      }, {
        date: '2016-05-02',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 弄'
      }, {
        date: '2016-05-04',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 弄'
      }, {
        date: '2016-05-01',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 弄'
      }, {
        date: '2016-05-08',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 弄'
      }, {
        date: '2016-05-06',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 弄'
      }, {
        date: '2016-05-07',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 弄'
      }],
      multipleSelection: []
    }
  },

  methods: {

    handleSelectionChange(val) {
      this.multipleSelection = val
    }
  }
}
</script>
